package com.qf.feign;

import com.qf.config.ServerConfig;
import com.qf.feign.factory.ProviderFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 远程调用
 * @author lixu
 */
/*@FeignClient(name =
        ServerConfig.PROVIDER,
        path = ServerConfig.ServerProviderCommonPath.PROVIDER,
        fallback = ProviderFeignImpl.class
)*/
@FeignClient(name =
        ServerConfig.PROVIDER,
        path = ServerConfig.ServerProviderCommonPath.PROVIDER,
        fallbackFactory = ProviderFeignFactory.class
)
public interface ProviderFeign {

    /**
     * 被调用的方法
     */
    @GetMapping("/list")
    public String list();
    /**
     * 被调用的方法
     */
    @GetMapping("/add")
    public String add();
}
